<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2024/3/19
 * Time: 16:03
 */

namespace app\middleware;


use support\Db;
use Webman\Event\Event;
use Webman\Http\Response;
use Webman\Http\Request;
use Webman\MiddlewareInterface;

class StartExec  implements MiddlewareInterface
{
    public function process(Request $request, callable $next): Response
    {
        //发布执行结束，时间
        Event::dispatch('request.start', [$request]);

        $response = $next($request);

        return $response;
    }
}